﻿<Window x:Class="ChristianHelle.DatabaseTools.SqlCe.QueryAnalyzer.View.CreateDatabaseWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ViewModel="clr-namespace:ChristianHelle.DatabaseTools.SqlCe.QueryAnalyzer.ViewModel"
        Title="Create Database"
        Height="228"
        Width="500"
        SizeToContent="Height"
        ResizeMode="NoResize"
        Topmost="True"
        DataContext="{Binding CreateDatabaseViewModel, Source={StaticResource ViewModelLocator}}"
        Loaded="CreateDatabaseWindow_OnLoaded">
    <Grid>
        <Label Content="Password:"
               Height="28"
               HorizontalAlignment="Left"
               Margin="21,101,0,0"
               VerticalAlignment="Top" />
        <PasswordBox Margin="91,101,23,60"
                     Name="passwordBox"
                     Height="28"
                     VerticalContentAlignment="Center"
                     ViewModel:PasswordBoxAssistant.BindPassword="True"
                     ViewModel:PasswordBoxAssistant.BoundPassword="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                     TabIndex="3" />
        <Button Content="OK"
                IsDefault="True"
                Margin="0,143,112,18"
                Name="btnOk"
                Click="btnOk_Click"
                Command="{Binding CreateDatabaseCommand}"
                HorizontalAlignment="Right"
                Width="75"
                TabIndex="5" />
        <Button Content="Cancel"
                IsCancel="True"
                Margin="0,143,23,18"
                Name="btnCancel"
                Click="btnCancel_Click"
                HorizontalAlignment="Right"
                Width="75"
                TabIndex="6" />
        <Label Content="Filename:"
               Height="28"
               HorizontalAlignment="Left"
               Margin="21,59,0,0"
               VerticalAlignment="Top" />
        <TextBox Text="{Binding Filename, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 Margin="91,59,54,102"
                 Height="28"
                 TabIndex="1"
                 Name="tbFilename" />
        <Button Content="..."
                Command="{Binding OpenFileCommand}"
                Margin="0,59,23,102"
                HorizontalAlignment="Right"
                Width="25"
                TabIndex="2" />
        <Label Content="Version:"
               Height="28"
               HorizontalAlignment="Left"
               Margin="21,18,0,0"
               VerticalAlignment="Top" />
        <ComboBox Margin="91,18,23,0"
                  Name="version"
                  VerticalContentAlignment="Center"
                  SelectedIndex="{Binding SelectedIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                  Height="28"
                  VerticalAlignment="Top"
                  TabIndex="7">
            <ComboBoxItem Content="SQL Compact Edition v3.1" />
            <ComboBoxItem Content="SQL Compact Edition v3.5"
                          IsSelected="True" />
            <ComboBoxItem Content="SQL Compact Edition v4.0" />
        </ComboBox>
        <Label Content="Max Database Size:"
               Height="28"
               HorizontalAlignment="Left"
               Margin="21,143,0,0"
               VerticalAlignment="Top" />
        <TextBox Height="28"
                 Margin="0,143,201,18"
                 Name="tbMaxDatabaseSize"
                 Text="{Binding MaxDatabaseSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                 VerticalContentAlignment="Center"
                 HorizontalAlignment="Right"
                 Width="139"
                 TabIndex="4" />
    </Grid>
</Window>
